<page-header [action]="phActionTpl">
  <ng-template #phActionTpl>
    <button (click)="query()" nz-button>搜索</button>
    <button (click)="add()" nz-button nzType="primary">新建</button>
  </ng-template>
</page-header>

<!-- <lb-pop #pop  [schema]="newSchema" (isVisiblechange)="change($event)" [title]="'主题新增'" [(isVisible)]="isVisible" [saveFu]="save"  [saveSname]="params.savesname" ></lb-pop> -->
<nz-card >
  <!-- <lb-grid #st [columns]="columns" [sname]="params.sname" [queryparas]="params.form"></lb-grid> -->

  <sf #sf mode="search" [schema]="searchSchema" (formReset)="st.reload()" [button]="null" autocomplete="off"></sf>

  <st #st [columns]="columns"  [data]="dataset">
    <ng-template #selectkuang st-row="custom" let-item  let-index="index" >
        <nz-switch [ngModel]="item.AAE100=='1'" nzCheckedChildren="启用" nzUnCheckedChildren="停用" (ngModelChange)="changeState(item)" ></nz-switch>
  </ng-template>
  <ng-template #colorSelect st-row="colorSelect" let-item  let-index="index">
    <div [ngStyle]="{'background':item.DAA030}"  style="width: 50%;" (click)="colorChange(item.DAA030,index)">&nbsp;</div>
  </ng-template>
  </st>

  <!-- <lb-pop #pop  [schema]="newSchema"  [title]="'主题新增'" [(isVisible)]="isVisible"   [saveSname]="params.savesname"  nzWidth="500"></lb-pop> -->
  <nz-modal [(nzVisible)]="isVisible" nzTitle="标签新增" (nzOnCancel)="ztAddhandleCancel()" (nzOnOk)="ztAddhandleOk()" nzWidth="500">
    <sf  #pop [schema]="newSchema" [formData]="formData" [button]="null" nzOkText="保存"  autocomplete="off">
      <ng-template sf-template="DAA030">
        <nz-select [(ngModel)]="newColor">
          <nz-option *ngFor="let option of yslist" [nzLabel]="option.label"  nzCustomContent [nzValue]="option.value">
            <nz-badge [nzColor]="option.value" [nzText]="option.label"></nz-badge>
          </nz-option>
        </nz-select>
      </ng-template>
    </sf>
  </nz-modal>

  <nz-modal [(nzVisible)]="chVisible" nzTitle="颜色更改" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" nzWidth="500">
    <sf  #ccpop [schema]="changeSchema" [formData]="formData" [button]="null" nzOkText="保存"  autocomplete="off">
      <ng-template sf-template="DAA030">
        <nz-select [(ngModel)]="nowColor">
          <nz-option *ngFor="let option of yslist" [nzLabel]="option.label"  nzCustomContent [nzValue]="option.value">
            <!-- <nz-tag [nzColor]="option.value">{{option.label}}</nz-tag> -->
            <!-- <div [ngStyle]="{'background':option.value}">&nbsp;</div> -->
            <nz-badge [nzColor]="option.value" [nzText]="option.label"></nz-badge>
          </nz-option>
        </nz-select>
      </ng-template>
    </sf>
  </nz-modal>
  
</nz-card>
